import { get, post } from "./http"

/* 登录接口 */
export const reqLogin = (params) => post("/api/login", params)

/* 注册接口 */
export const reqRegister = (params) => post("/api/register", params)

/* 新人专享 */
export const  reqNew =(params) =>get("/api/getnew",params)

/* 秒杀 */
export  const  reqSeckill =()=>get("/api/getseckill") 

//首页商品信息
export const reqHomeGoods=(params)=>get("/api/getindexgoods",params)

/* 商品分类 */
export const reqCate =()=>get("/api/getcate");

/* 获取分类商品 */
export  const reqGoods =params =>get("/api/getgoods",params);

//获取一条商品信息
export const reqgetgoodsinfo = (params)=>get('/api/getgoodsinfo',params);

//购物车添加
export const reqCartAdd = (params) => post("/api/cartadd", params);

//轮播图信息(我的)
export const reqMyBanner = () => get("/api/getbanner");

//购物车列表
export const reqCartList = (params) => get("/api/cartlist", params);

//购物车删除
export const reqCartDelete = (params) => post("/api/cartdelete", params);

//购物车修改 id  type:  1是减少  2是增加
export const reqcartedit = (params) => post("/api/cartedit",params)



